home *** CD-ROM | disk | FTP | other *** search
- l 200 2 0 1
- e 1F7,'FAT1FAT32'
-
- a
- cld ;load & compare forward
- mov si,236 ;'FAT16' and 'FAT12' marker locations
- mov di,1F7
- mov cx,4
- repz cmpsb
- mov di,22a
- jz 124
- mov si,252 ;'FAT32' marker location
- mov di,1FB
- mov cx,5
- repz cmpsb
- mov di,246 ;ID location for FAT32 (high byte)
- jz 124
- mov di,22a ;ID location for FAT16 and FAT12 (high byte)
- mov si,5d ;Jumps to 124 come to this instruction; 5d is location of 2nd argument
- mov dx,4 ;number of digits in serial number
- lodsb
- cmp al,39 ;check if a letter
- jbe 133
- and al,5f ;make sure we have upper case
- sub al,37 ;convert 'a'-'f' to hex value
- and al,0f ;make sure we only have a single hex digit
- mov cl,4 ;store the first in hi nibble
- shl al,cl
- mov bl,al ;save it away
- lodsb ;load next digit
- cmp al,39 ;process the same as the previous digit
- jbe 144
- and al,5f
- sub al,37
- and al,0f
- or al,bl ;and combine this low nibble with high nibble
- std ;we need to store going backward (MSB in high mem)
- stosb
- cld ;load & compare forward
- dec dx ;decrement loop counter
- jnz 12A
- int 3 ;go back to debugger
-
- g=100
- w 200 2 0 1
-
- a 100
- jmp f000:fff0 ;jump to reboot address
-
- g=100
-